package com.piesat.quake.business.device.service.impl;

import com.piesat.quake.business.device.model.config.ThresholdData;
import com.piesat.quake.business.device.mapper.DThresholdDataMapper;
import com.piesat.quake.business.device.service.DThresholdDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2023-03-13
 */
@Service
public class DThresholdDataServiceImpl extends ServiceImpl<DThresholdDataMapper, ThresholdData> implements DThresholdDataService {

    @Override
    public void update(ThresholdData threshold) {
        boolean b = saveOrUpdate(threshold);
        if (!b){
            throw new IllegalStateException("阈值数据更新失败");
        }
    }
}
